package ex132;

import java.util.Scanner;

public class Main {
	
    public static void main(String args[]) {
    	 
        Scanner in = new Scanner(System.in);
        int x, y, sum = 0;
        
        x = in.nextInt();
        y = in.nextInt();

        x = Math.min(x, y);
        y = Math.max(x, y);
        
        for (int i = x; i <= y; i++) {
        	if (i % 13 != 0) {
        		sum += i;
        	}
        }
        System.out.println(sum);
        in.close();
    }
    
}